
type TaskStatus = 'waiting' | 'running' | 'success' | 'error' ;

export interface ExecutionRecord {
  id: string;
  taskId: string;
  taskTitle: string;
  taskGuide: string;
  status: TaskStatus;
  duration?: string;
  category: string;
  createdAt: Date;
  error?: string;
  logs?: { createdAt: string; message: string; }[];
  screenshot?: string;
  outputFiles?: {
    id: string;
    name: string;
    type: string;
    size: number;
  }[];
}

export interface Task {
  id: string;
  taskTitle: string;
  taskGuide: string;
  createdAt: Date;
  category: string;
}


export interface QueuedTask {
  id: string;
  taskId: string;
  taskTitle: string;
  status: TaskStatus;
  priority: 'normal' | 'high' | 'low';
}

export interface TaskOption {
  id: string;
  taskTitle: string;
  category: string;
}

export interface TaskExecutorProps {
  tasks: Task[];
  isExecuting: boolean;
  onBatchExecute: (taskIds: string[]) => void;
}

export interface TaskLogsProps {
  logs: string[];
  onClearLogs?: () => void;
}

export interface TaskResultsProps {
  taskQueue: QueuedTask[];
  taskResults: ExecutionRecord[];
  outputFiles: OutputFile[];
  onDownload: (taskId: string, fileName: string) => void;
}

export interface OutputFile {
  id : string;
  name: string;
  type: string;
  size: number;
} 